
import { _decorator, Component, Node, Camera, CCLoader, Vec3, Label } from 'cc';
const { ccclass, property } = _decorator;

@ccclass('Main')
export class Main extends Component {


    // private txtName:Label

    private defaultP: Vec3 = new Vec3(0, 0, 0)

    private pianyiZ: number = 100

    start() {
        this.defaultP = this.node.getPosition();
    }

    update(deltaTime: number) {


        this.node.setPosition(this.defaultP.x, this.defaultP.y, this.defaultP.z + this.pianyiZ);
        this.pianyiZ--;
        if (this.pianyiZ <= 0) {
            this.pianyiZ = 100;
        }


    }
}
